{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.css' %}">
    <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.7.0/css/font-awesome.css' %}">
    <style>
        .navbar-default {
            border-radius: 0;
        }

    </style>
    {% block css %}{% endblock %}
</head>
<body>
<div>
    <nav class="navbar navbar-default">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{% url 'main:index' %}">Saas任务管理系统</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    {#                    <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>#}
                    <li><a href="#">产品功能</a></li>
                    <li><a href="#">企业方案</a></li>
                    <li><a href="#">帮助文档</a></li>
                    <li><a href="{% url 'main:price' %}">价格</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% if request.user.username %}
                        <li><a href="#">Link</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                               aria-haspopup="true"
                               aria-expanded="false">{{ request.user.username }} <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="{% url 'main:project' %}">任务管理</a></li>
                                <li><a href="#">个人信息</a></li>
                                <li><a href="{% url 'main:orderlist' %}">我的订单</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{% url 'main:api_logout' %}">注 销</a></li>
                            </ul>
                        </li>
                    {% else %}
                        <li><a href="{% url 'main:login' %}">登录</a></li>
                        <li><a href="{% url 'main:register' %}">注册</a></li>
                    {% endif %}
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
    {% block content %}{% endblock %}
    {% block content2 %}{% endblock %}
</div>
{#    jquery必须在bootstrap至上#}
<script src="{% static 'js/jquery-3.6.3.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap-3.4.1/js/bootstrap.js' %}"></script>
{% block js %}{% endblock %}

</body>
</html>